package com.heima.behavior.controller.v1;

import com.heima.behavior.service.IApArticleBehaviorService;
import com.heima.model.behavior.dtos.ArticleBehaviorDTO;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "加载用户行为 API")
@RestController
@RequestMapping("api/v1/article")
public class ApArticleBehaviorController {

    @Autowired
    private IApArticleBehaviorService apArticleBehaviorService;

    @ApiOperation(value = "加载用户对文章所有行为的状态")
    @PostMapping("load_article_behavior")
    public ResponseResult loadArticleBehavior(@RequestBody ArticleBehaviorDTO articleBehaviorDTO){
        return apArticleBehaviorService.loadArticleBehavior(articleBehaviorDTO);
    }
}
